package test3_25.demo11;

public class Homework14_9_count {

    public static void count(String str,String remove){
        int startLength = str.length();
        String s = str.replace(remove,"");
        int endLength = s.length();
        int removeLength = remove.length();
        int num = (startLength-endLength)/removeLength;
        System.out.println("出现的次数为："+num);

    }

    public static void main(String[] args) {
        Homework14_9_count.count("abkkcdkkefkkskk","kk");

    }
}
